﻿<UserControl x:Class="FormCreator.View.ElementProperties"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid Grid.IsSharedSizeScope="True">
        <ItemsControl ItemsSource="{Binding Properties}">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <Grid Margin="10" ToolTip="{Binding Description}" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition SharedSizeGroup="A"/>
                            <ColumnDefinition Width="1*"/>
                        </Grid.ColumnDefinitions>                        
                        <Grid.RowDefinitions>
                            <RowDefinition/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <TextBlock Text="{Binding Name}" FontWeight="Bold"/>
                        <TextBlock Grid.Row="1" Text="{Binding Description}" MaxWidth="200"/>
                        <ContentControl Grid.Column="1" Grid.RowSpan="2" Margin="5" Content="{Binding Value}"/>
                    </Grid>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </Grid>
</UserControl>
